

@RestController
@RequestMapping("/dmsPreDeployMachine")
public class DmsPreDeployMachineController {

    @Resource
    private DmsPreDeployMachineService dmsPreDeployMachineService;


    /**
     * 获取 DmsPreDeployMachine 分页列表
     */
    @GetMapping("/pagination")
    public Ret getDmsPreDeployMachinePagination( PaginationVo paginationVo, DmsPreDeployMachineQuery dmsPreDeployMachineQuery ) throws Exception {
        IPage page = dmsPreDeployMachineService.getDmsPreDeployMachinePagination(paginationVo, dmsPreDeployMachineQuery );
        return Ret.toPage(page);
    }


    /**
     * 获取 DmsPreDeployMachine 所有数据
     */
    @GetMapping("/all")
    public Ret getDmsPreDeployMachineAllList( DmsPreDeployMachineQuery dmsPreDeployMachineQuery ) throws Exception {
        List<DmsPreDeployMachineEntity> list = dmsPreDeployMachineService.getDmsPreDeployMachineAllList( dmsPreDeployMachineQuery );
        return Ret.ok(list);
    }



    /**
     * 获取 DmsPreDeployMachine 详情
    */
   @GetMapping("/{id}")
   public Ret getDmsPreDeployMachineDetail(@PathVariable Long id) throws Exception {

       DmsPreDeployMachineEntity dmsPreDeployMachine = dmsPreDeployMachineService.getDmsPreDeployMachineDetail(id);
       return Ret.ok(dmsPreDeployMachine);
   }


    /**
     * 新增 DmsPreDeployMachine
     * */
    @PostMapping("")
    public Ret addDmsPreDeployMachine(@RequestBody DmsPreDeployMachineVo dmsPreDeployMachineVo) throws Exception {

        dmsPreDeployMachineService.addDmsPreDeployMachine(dmsPreDeployMachineVo);
        return Ret.ok();
    }


    /**
     * 更新 DmsPreDeployMachine
     * */
    @PutMapping("")
    public Ret updateDmsPreDeployMachine(@RequestBody DmsPreDeployMachineVo dmsPreDeployMachineVo) throws Exception {

        dmsPreDeployMachineService.updateDmsPreDeployMachine(dmsPreDeployMachineVo);
        return Ret.ok();
    }


    /**
     * 删除 DmsPreDeployMachine
     * */
    @PostMapping("/batchRemove")
    public Ret batchRemoveDmsPreDeployMachine( @RequestBody List<Long> ids ) throws Exception {

        dmsPreDeployMachineService.batchRemoveDmsPreDeployMachine(ids);
        return Ret.ok();
    }
}

  